<template>
	<div>
		<div>
			<el-input
				style="width: 300px; margin-right: 10px; margin-left: -500px;"
				clearable
				@clear="initData"
				v-model="nursingLevel"
				@keydown.enter.native="initData"
			    placeholder="请输入级别进行搜索"
			    prefix-icon="el-icon-search">
			</el-input>
			<el-button type="primary" @click="initData">搜索</el-button>
			<el-button type="primary" @click="showLevelAdd">添加</el-button>
		</div>
		<div>
			<el-table
			    :data="LevelData"
			    stripe
				border
			    style="width: 100%">
			    <el-table-column
			      prop="nursingId"
			      label="序号"
			      width="100"
				  >
			    </el-table-column>
				<el-table-column
				  prop="nursingLevel"
				  label="护理级别"
				  width="150"
				  >
				</el-table-column>
			   
			    <el-table-column
			      prop="levelStatus"
			      label="状态"
				  width="150"
				  >
			    </el-table-column>
				<el-table-column
				  label="操作"
				  align="center"
				  width="200">
				  <template slot-scope="scope">
					  <el-button @click="showLevelEdit(scope.row)">编辑</el-button>
					  <el-button @click="deleteLevel(scope.row)" type="danger">删除</el-button>
				  </template>
				</el-table-column>
			  </el-table>
			  
			  <el-table
			      :data="LevelData"
			      stripe
			  	border
			      style="width: 100%">
			      <el-table-column
			        prop="nursingId"
			        label="序号"
			        width="100"
			  	  >
			      </el-table-column>
			  	<el-table-column
			  	  prop="nursingLevel"
			  	  label="护理级别"
			  	  width="150"
			  	  >
			  	</el-table-column>
			     
			      <el-table-column
			        prop="levelStatus"
			        label="状态"
			  	  width="150"
			  	  >
			      </el-table-column>
			  	<el-table-column
			  	  label="操作"
			  	  align="center"
			  	  width="200">
			  	  <template slot-scope="scope">
			  		  <el-button @click="showLevelEdit(scope.row)">编辑</el-button>
			  		  <el-button @click="deleteLevel(scope.row)" type="danger">删除</el-button>
			  	  </template>
			  	</el-table-column>
			    </el-table>
			
			  <el-pagination
			    background
				@current-change="currentChange"
			    layout="prev, pager, next,jumper,->,total"
			    :total=total>
			  </el-pagination>
		</div>
		
		<el-dialog title="级别添加" :visible.sync="dialogVisible">
		 	<LevelAdd  :dialogVisible.sync=dialogVisible @add="initData()"></LevelAdd>
		 </el-dialog>
		
		<el-dialog title="级别编辑" :visible.sync="editVisible">
			<LevelEdit :editVisible.sync="editVisible" :formData="formData"></LevelEdit>
		</el-dialog>
		
	</div> 
</template>

<script>
</script>

<style>
</style>
